package com.kgc.fk.controller;

import com.kgc.basic.util.ResponseMsg;
import com.kgc.collection.remote.OtherPayServiceApi;
import com.kgc.fk.service.OtherPayService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;
@RestController
public class OtherPayController implements OtherPayServiceApi {

    private Logger logger = LoggerFactory.getLogger(OtherPayController.class);

    @Resource
    private OtherPayService otherPayService;

    @Override
    public ResponseMsg getQTFKPage(Map<String, Object> params) {
        logger.info("getQTFKPage params:{}", params);
        ResponseMsg responseMsg = otherPayService.getOtherPayPage(params);
        logger.info("getQTFKPage controlEnd params{} responseMsg:{}", params,responseMsg);
        return responseMsg;
    }

    @Override
    public ResponseMsg addQTFK(Map<String, Object> params) {
        logger.info("addQTFK params:{}", params);
        ResponseMsg responseMsg = otherPayService.addOtherPay(params);
        logger.info("addQTFK controlEnd params{} responseMsg:{}", params,responseMsg);
        return responseMsg;
    }

    @Override
    public ResponseMsg getQTFK(Map<String, Object> params) {
        logger.info("getQTFK params:{}", params);
        ResponseMsg responseMsg = otherPayService.getQTFK(params);
        logger.info("getQTFK controlEnd params{} responseMsg:{}", params,responseMsg);
        return responseMsg;
    }

    @Override
    public ResponseMsg modiQTFK(Map<String, Object> params) {
        logger.info("modiQTFK params:{}", params);
        ResponseMsg responseMsg = otherPayService.updateOtherPay(params);
        logger.info("modiQTFK controlEnd params{} responseMsg:{}", params,responseMsg);
        return responseMsg;
    }

    @Override
    public ResponseMsg updateQTFK(Map<String, Object> params) {
        logger.info("updateQTFK params:{}", params);
        ResponseMsg responseMsg = otherPayService.updateQTFK(params);
        logger.info("updateQTFK controlEnd params{} responseMsg:{}", params,responseMsg);
        return responseMsg;
    }

    @Override
    public ResponseMsg getQTFKList(Map<String, Object> params) {
        logger.info("getQTFKList params:{}", params);
        ResponseMsg responseMsg = otherPayService.getQTFKList(params);
        logger.info("getQTFKList controlEnd params{} responseMsg:{}", params,responseMsg);
        return responseMsg;
    }


}
